package com20230214.xiti;

import java.util.Arrays;
import java.util.Random;

public class Demo03 {
    public static void main(String[] args) {
        int[] arr = new int[10];
        Random r = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = r.nextInt( 35)+ 23;
        }
        System.out.println(Arrays.toString(arr) );
        int y = jiOu(arr);
        System.out.println("偶数的个数有：" + y + "个");



    }
    static int jiOu(int[] x){
        int count = 0;
        for (int i = 0; i < x.length; i++) {
            if(x[i] % 2 == 0){
                count++;
            }
        }
        return count;


    }
}
